import java.util.AbstractList;
import java.util.ArrayList;
import java.util.List;

public class Pokers {
    public static final String[] SUITS = {"♣","♦","♠","♥"};   //花色
    //生成一张扑克牌
    public static List<Poker> buyPokers() {
        List<Poker> pokerList = new ArrayList<Poker>();    //这句创建了一个ArrayList实现类的对象后把它上溯到了List接口。
        //此时它就是一个List对象了，它有ArrayList类具有的属性和方法，但是List接口没有的 它就不能再用

        for (int i = 0; i < 4; i++) {   //四个花色
            for (int j = 1; j <= 13; j++) {
                String suit = SUITS[i];
                int rank = j;
                Poker poker = new Poker(suit,rank);
            }
        }
        return pokerList;
    }

    public static void main(String[] args) {
        List<Poker> pokerList = buyPokers();
        System.out.println(pokerList);
    }
}

